/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.crm.action.sale;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.crm.mapper.sale.BusinessOppAdminMapper;
public class BusinessOppAdmin extends BaseAction
{
    @Autowired(required=false)
	private BusinessOppAdminMapper mapper;
    /**
    商机管理
    */
    
    public Map businessOppAdmin() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_predict=mapper.s_predict(params);
        result.put("s_predict", s_predict);
        
        return result;
    }
    /**
    增加新商机
    */
    
    public Map businessOppAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        SQLList<SQLMap> client=mapper.client(params);
        result.put("client", client);
        
        
        SQLList<SQLMap> person=mapper.person(params);
        result.put("person", person);
        
        return result;
    }
    /**
    商机明细
    */
    
    public Map businessOppDet() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_predict=mapper.s_predict(params);
        SQLMap s_predict_emt=s_predict.getExistfirst();
        result.put("s_predict", s_predict_emt);
        
        
        SQLList<SQLMap> s_part=mapper.s_part(params);
        result.put("s_part", s_part);
        
        return result;
    }
    /**
    组成部分
    */
    
    public Map businessOppConstitute() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> part=mapper.part(params);
        result.put("part", part);
        
        return result;
    }
    /**
    增加组成
    */
    
    public Map businessOppConstituteAdd() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> person=mapper.person(params);
        result.put("person", person);
        
        return result;
    }
    /**
    组成
    */
    
    public Map opp() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> part=mapper.part(params);
        result.put("part", part);
        
        return result;
    }
    /**
    增加新商机修改
    */
    
    public Map businessOppAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID1 = mapper.CMID1(params);
        result.put("CMID1", CMID1);
        
        
        int CMID2 = mapper.CMID2(params);
        result.put("CMID2", CMID2);
        
        return result;
    }
    /**
    */
    
    public Map d_part() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_part(params);
        
        return result;
    }
    /**
    增加组成修改
    */
    
    public Map businessOppConstituteAddSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int CMID2 = mapper.CMID2(params);
        result.put("CMID2", CMID2);
        
        return result;
    }
}